<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /* 数组的解构赋值 */
        const arr = [1,2,3,4,5,6,7]
        // arr[0]
        // arr[1]
        // arr[2]
        // arr[3]
        // arr[4]
        // arr[5]
        // arr[6]
        //解构赋值
        // const [a,b,c,d,e,f,g] = arr;
        // // console.log(a,b,c,d,e,f,g);
        // console.log(a);


        // const [a,b,c] = arr;
        // console.log(a,b,c);

        // const [a,b,c,a1,b1,c1,a2,b2,c2] = arr;
        // console.log(a,b,c,a1,b1,c1,a2,b2,c2);


        /* 对象的解构赋值 */
        const obj = {
            name:"张三",
            age:18,
            gender:"男"
        }

        /* 对象的解构赋值 */
        // const {name,age,gender} = obj;
        // console.log(name,age,gender);

    </script>
</body>
</html>